package cn.caijiapeng.spt.kit;

import java.util.UUID;

import com.jfinal.kit.HashKit;

public class MyKit {
	
	public static long getCurRefreshTime() {
		return System.currentTimeMillis();
	}
	
	public static long getCurCreateTime() {
		return System.currentTimeMillis();
	}
	
	public static String getUUID() {
		return UUID.randomUUID().toString().replaceAll("-", "");
	}
	
	public static String encodeSysUserPassword(String password, String salt) {
		return HashKit.sha256(salt + "##" + password);
	}
	
	public static void main(String[] args) {
		String salt = HashKit.generateSalt(16);
		System.err.println(salt);
		System.err.println(encodeSysUserPassword("test", salt));
	}
}
